class Wife:
    # 类成员
    sex = '女'

    #   构造对象
    def __init__(self, name):
        # 对象成员
        self.name = name

    #   实例方法
    def cooking(self):
        print('会做饭')

    @classmethod
    def born_baby(cls):
        print('生小孩')


wife = Wife('貂蝉')
print(wife.__dict__)
wife.cooking()
Wife.cooking(wife)  # 不建议通过类名调用对象方法

wife.born_baby()
